package com.hmall.cart;

import com.hmall.api.client.ItemClient;
import com.hmall.api.config.DefaultFeignConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * 购物车启动类
 * 该类是Spring Boot应用的入口类，负责配置和启动购物车微服务
 */
//@EnableFeignClients(clients = {ItemClient.class}) // 已被下面的注解替代，用于指定要启用的Feign客户端
@MapperScan("com.hmall.cart.mapper") // MyBatis映射器扫描包，自动注册该包下的所有Mapper接口
@EnableFeignClients(basePackages = "com.hmall.api.client",defaultConfiguration = DefaultFeignConfig.class)// 启用Feign客户端，并指定Feign客户端所在的包，以及Feign客户端的默认配置类
@SpringBootApplication
public class CartApplication {
    public static void main(String[] args) {
        SpringApplication.run(CartApplication.class, args);
    }
}
